# -*- coding: utf-8 -*-
# @Author: Tim Liu
# @Date: 2024-10-17
# @Last Modified by: Tim Liu
# @Last Modified time: 2024-10-17

# @Description: Conversation Schemas 

from pydantic import BaseModel, ConfigDict
from core.data_types import DatetimeStr
from apps.vadmin.auth.schemas import UserSimpleOut

class Conversation(BaseModel):
    session_id: str | None = None

    converse_start_time: DatetimeStr | None = None
    converse_end_time: DatetimeStr | None = None
    
    create_user_id: int | None = None


class ConversationSimpleOut(Conversation):
    model_config = ConfigDict(from_attributes=True)

    id: int
    session_id: str | None = None
    
    update_datetime: DatetimeStr
    create_datetime: DatetimeStr


class ConversationListOut(ConversationSimpleOut):
    model_config = ConfigDict(from_attributes=True)

    create_user: UserSimpleOut
